<?php
/**
 * SocialEngine
 *
 * @category   Application_Core
 * @package    Core
 * @copyright  Copyright 2012 YouNet Company
 * @version    $Id: index.tpl
 * @author     Minh Nguyen
 */
?>
<h2>
  <?php echo $this->translate('Adv Menu System Plugin') ?>
</h2>

<?php if( count($this->navigation) ): ?>
<div class='tabs'>
    <?php
    // Render the menu
    echo $this->navigation()->menu()->setContainer($this->navigation)->render()
    ?>
</div>
<?php endif; ?>
<div class='clear'>
  <div class='settings'>
    <?php echo $this->form->render($this); ?>
  </div>
</div>   
<style type="text/css">
#notifications-label,
#main_menu_-label,
#main_menu_dropdownbox-label,
#mini_menu_-label,
#mini_menu_dropdownbox-label,
#notification_dropdownbox_-label,
#search_-label
{
    color: blue;
}
#head_main_menu-label,
#head_mini_menu-label,
#head_notifications-label,
#head_search-label
{
	color: Black;
	text-transform: uppercase;
	margin-bottom: -10px;
}
</style>
<script type="text/javascript">
    var elements = $$('div[id^="main_menu_"]');
    for(var i = 0; i < elements.length; i ++)
    {
    	elements[i].style.display = "none";
    }
    elements = $$('div[id^="mini_menu_"]');
    for(var i = 0; i < elements.length; i ++)
    {
    	elements[i].style.display = "none";
    }
    elements = $$('div[id^="notification_dropdown_"]');
    for(var i = 0; i < elements.length; i ++)
    {
    	elements[i].style.display = "none";
    }
    elements = $$('div[id^="icon_"]');
    for(var i = 0; i < elements.length; i ++)
    {
    	elements[i].style.display = "none";
    }
    document.getElementById("notifications-wrapper").style.display = 'none';
    document.getElementById("notification_width-wrapper").style.display = 'none';
    elements = $$('div[id^="notification_count_"]');
    for(var i = 0; i < elements.length; i ++)
    {
    	elements[i].style.display = "none";
    }
    elements = $$('div[id^="notification_dropdownbox_"]');
    for(var i = 0; i < elements.length; i ++)
    {
    	elements[i].style.display = "none";
    }
    elements = $$('div[id^="update_dropdown"]');
    for(var i = 0; i < elements.length; i ++)
    {
    	elements[i].style.display = "none";
    }
    elements = $$('div[id^="search_"]');
    for(var i = 0; i < elements.length; i ++)
    {
    	elements[i].style.display = "none";
    }
	function show_settingById(id, obj)
	{
		var _elements = $$('div[id^="'+ id +'_"]');
		var display = "";
		if(obj.innerHTML == "Show")
	    {
	    	obj.innerHTML = "Hide";
	    	display = "";
	    }
	    else
	    {
	    	obj.innerHTML = "Show";
	    	display = "none";
	    }
	    for(var i = 0; i < _elements.length; i ++)
	    {
	    	_elements[i].style.display = display;
	    	
	    }
	    if(id == "mini_menu")
	    {
	    	_elements = $$('div[id^="notification_dropdown_"]');
	    	for(var i = 0; i < _elements.length; i ++)
		    {
		    	_elements[i].style.display = display;
		    	
		    }
	    }
	    if(id == 'icon')
	    {
	    	document.getElementById("notifications-wrapper").style.display = display;
    		document.getElementById("notification_width-wrapper").style.display = display;
    		elements = $$('div[id^="notification_count_"]');
		    for(var i = 0; i < elements.length; i ++)
		    {
		    	elements[i].style.display = display;
		    }
		    elements = $$('div[id^="notification_dropdownbox_"]');
		    for(var i = 0; i < elements.length; i ++)
		    {
		    	elements[i].style.display = display;
		    }
		    elements = $$('div[id^="update_dropdown"]');
		    for(var i = 0; i < elements.length; i ++)
		    {
		    	elements[i].style.display = display;
		    }
	    }
	}
</script>